package com.cq.hd.order.api;

import com.alibaba.fastjson.JSONObject;
import com.cq.hd.common.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "hd-o2o-order-service", contextId = "hf-order-callback-api")
public interface HfOrderCallbackApi {

    // 微信小程序预下单回调
    @PostMapping("/order/hfOrderCallback/preOrderCallback")
    Result<Boolean> preOrderCallback(@RequestBody JSONObject dataObj);

    // 交易退款回调
    @PostMapping("/order/hfOrderCallback/refundCallback")
    Result<Boolean> refundCallback(@RequestBody JSONObject dataObj);

    // 聚合正扫下单回调
    @PostMapping("/order/hfOrderCallback/jsPayCallback")
    Result<Boolean> jsPayCallback(@RequestBody JSONObject dataObj);
}
